//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.capricornus.demo.common;

import java.io.PrintStream;
import java.io.PrintWriter;
import java.io.Serializable;

public class ApplicationException extends RuntimeException implements Serializable {
    private static final long serialVersionUID = -510218834727034089L;
    private Throwable cause;

    public ApplicationException() {
    }

    public ApplicationException(String message) {
        super(message);
    }

    public ApplicationException(Throwable t) {
        super(t.getMessage());

        try {
            this.initCause(t);
        } catch (Throwable var3) {
        }

    }

    public ApplicationException(String message, Throwable t) {
        super(message);

        try {
            this.initCause(t);
        } catch (Throwable var4) {
        }

    }

    public Throwable initCause(Throwable t) throws IllegalArgumentException, IllegalStateException {
        this.cause = t;
        return this;
    }

    public Throwable getCause() {
        return this.cause;
    }

    public void printStackTrace(PrintStream ps) {
        if (null != this.cause) {
            this.cause.printStackTrace(ps);
        }

        super.printStackTrace(ps);
    }

    public void printStackTrace(PrintWriter pw) {
        if (null != this.cause) {
            this.cause.printStackTrace(pw);
        }

        super.printStackTrace(pw);
    }

    public void printStackTrace() {
        this.printStackTrace(System.err);
    }
}
